<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/component/commonTagLib.jsp"%>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <title>已申报药品列表</title>
    <%@ include file="/WEB-INF/component/commonCSS.jsp" %>
</head>
<body class="skin-blue-light sidebar-mini fixed skin-blue-light-frame">

    <section class="content-header">
        <h1>已申报药品列表</h1>
        <ol class="breadcrumb">
            <li><a href="${ctx}/home.jsp"><i class="fa fa-home"></i>首页</a></li>
            <li class="active"><a href="#">招标采购管理</a></li>
            <li class="active"><a href="#">已申报药品列表</a></li>
        </ol>
    </section>
    
    <section class="content">
        <div class=" box box-success">
            <div class="box-body">
                <div class=" form-inline">
                    <div class="form-group form-group-xs">
                        <label for="txtDrugName">药品编号：</label>
                        <input class="form-control" type="text" id="drugCode" name="drugCode" placeholder="药品编号" />
                    </div>
                    <div class="form-group form-group-xs">
                        <label for="txtDrugForm">药品名称：</label>
                        <input class="form-control" type="text" id="qualityspecName" name="qualityspecName" placeholder="药品名称" />
                    </div>
                    <button type="button" onclick="gridSerch()" class="btn btn-success btn-sm">查询</button>
                </div>
            </div>
        </div>

        <table class="jqgrid" id="gridlist"></table>
        <div id="gridpage"></div>

        <div class=" box box-warning bottongroup">
            <a href="${ctx }/bidProject/toDeclareDrugByCompList.html?projId=${param.projId}" class="btn btn-default btn-sm">返回</a>
        </div>
    </section>
    <form action="${ctx}/bidProjCompany/toList.html" method="post" id="Form">
    <input type="hidden" name="projId" id="projId">
    <input type="hidden" name=newname id="newname">
    </form>
     <form action="${ctx}/bidProject/toHospList.html" method="post" id="FormAddhosp">
    <input type="hidden" name="projIdAddhosp" id="projIdAddhosp">
    <input type="hidden" name="name" id="name">
    </form>
      <form action="${ctx}/bidProject/toCompList.html" method="post" id="FormAddcomp">
    <input type="hidden" name="projIdAddcomp" id="projIdAddcomp">
    <input type="hidden" name="compName" id="compName">
    </form>
    <%@ include file="/WEB-INF/component/commonJS.jsp" %>
    <script type="text/javascript">
        $(function () {
            $("#gridlist").jqGrid({
                url: "${ctx}/bidProject/getCompDeclareDrugDataList.html?projId=${projId}&compId=${param.compId}",
                mtype: "POST",
                postData: {"projId" : "${projId}"},
                datatype: "json",
                autowidth: true,
                shrinkToFit:false,
                height: 270,
                colNames: ['projProddrugId','药品编号', '药品名称', '剂型','规格','转换系数','单位','材质'],
                colModel: [
                    { name: 'projProddrugId', hidden:true,width: 100, align: 'center' ,sortable: false},
                    { name: 'drugCode', width: 160, align: 'center' ,sortable: false},
                    { name: 'qualityspecName', width: 180, align: 'center' ,sortable: false},
                    { name: 'formName', width: 160, align: 'center' ,sortable: false},
                    { name: 'specName', width: 160, align: 'center' ,sortable: false},
                    { name: 'factor', width: 170, align: 'center' ,sortable: false},
                    { name: 'unit', width: 170, align: 'center' ,sortable: false},
                    { name: 'materialName', width: 170, align: 'center' ,sortable: false}
                ],
                rowNum: 20,
                rowList: [10, 20, 50, 100],
                rownumbers: true,
                pager: "#gridpage",
                viewrecords: true,
                caption: "已申报药品列表",
                jsonReader: {
                    repeatitems: false  
                },
                loadComplete: function (data) { //完成服务器请求后，回调函数
                }
            });
            $("#gridlist").jqGrid('navGrid', '#gridpage', { add: false, edit: false, del: false, search: false, refresh: false });
            $(window).trigger("resize");
        });
        //查询
        function gridSerch() {
        	var drugCode = $("#drugCode").val();
        	var qualityspecName = $("#qualityspecName").val();
    		$("#gridlist").jqGrid('setGridParam',{  
    	        datatype:'json',
    	        postData:{"drugCode":drugCode,
    	        		"qualityspecName":qualityspecName}
    	    }).trigger("reloadGrid"); //重新载入  
    	}
        
        
        
       
      
        
        
    </script>
</body>
</html>